package com.allen.imsystem.friend.model.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="FriendApply对象", description="")
public class FriendApply implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "自增id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "发起好友申请者")
    private String fromUid;

    @ApiModelProperty(value = "接收好友申请者")
    private String toUid;

    @ApiModelProperty(value = "是否通过，0->未通过，1->通过")
    private Boolean pass;

    @ApiModelProperty(value = "要把申请的好友分的组id")
    private Integer groupId;

    @ApiModelProperty(value = "申请理由")
    private String reason;

    @ApiModelProperty(value = "是否已读")
    private Boolean hasRead;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "最后一次更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    public FriendApply() {
    }

    public FriendApply(String fromUid, String toUid, Integer groupId, String reason) {
        this.fromUid = fromUid;
        this.toUid = toUid;
        this.groupId = groupId;
        this.reason = reason;
    }
}
